package mk.com.ldm.corepoint.implementation.client.event;

import java.util.ArrayList;
import java.util.HashMap;

import mk.com.ldm.corepoint.implementation.shared.ConfigurationObject;

import com.google.gwt.event.shared.GwtEvent;

public class CoreEvent extends GwtEvent<CoreEventHandler> {
	
	public static Type<CoreEventHandler> TYPE = new Type<CoreEventHandler>();
	private ArrayList<String> args = new ArrayList<String>();
	private String type;
	private String call;
	
	public CoreEvent(ArrayList<String> args, String type, String call){
		this.args = args;
		this.type = type;
		this.call = call;
	}
	
	public String getType(){
		return type;
	}
	
	public ArrayList<String> getArgs(){
		return args;
	}
	
	public String getCall(){
		return call;
	}
	
	@Override
	public Type<CoreEventHandler> getAssociatedType(){
		return TYPE;
	}
	
	@Override
	protected void dispatch(CoreEventHandler handler){
		handler.onCore(this);
	}
	
	
}
